<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商城后台管理系统</title>
<link rel="stylesheet" type="text/css" href="./js/jquery-easyui-1.4.1/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="./js/jquery-easyui-1.4.1/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="./css/taotao.css" />
<script type="text/javascript" src="./js/jquery-easyui-1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="./js/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="./js/jquery-easyui-1.4.1/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<link href="./js/kindeditor-4.1.10/themes/default/default.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="./js/kindeditor-4.1.10/kindeditor-all-min.js"></script>
<script type="text/javascript" charset="utf-8" src="./js/kindeditor-4.1.10/lang/zh_CN.js"></script>

<link rel="stylesheet" href="./css/iconfont/demo.css">
    <link rel="stylesheet" href="./css/iconfont/iconfont.css">
    
<style type="text/css">
	.content {
		padding: 10px 10px 10px 10px;
	}
	.header{
	    background-color: #00BCD4;
	    width: 1918px;
	    height: 48px;
	    color: white;
	    font-size: 24px;
	    /* margin: 0 auto; */
	    line-height: 48px;
	    font-family: monospace;
    }
    .header .left{
    	float:left
    }
   .header .right{
    float: right;
    margin-right: 10px;
    font-size: 17px;
    }
   .header .right a{
        color: white;
        
     }
</style>
</head>
<body class="easyui-layout">
	<div class="header"data-options="region:'north'" style="height:50px;">
		<div class="left">商城后台管理系统</div>
		<div class="right" ">
				<a href="./logout">
			   <i class="icon iconfont icon-logout"></i>
			   		<span>退出</span>
                </li>
                </a>
		</div>
	</div>
    <div data-options="region:'west',title:'菜单',split:true" style="width:180px;">
    	<ul id="menu" class="easyui-tree" style="margin-top: 10px;margin-left: 5px;">
         </ul>
    </div>
    <div data-options="region:'center',title:''">
    	<div id="tabs" class="easyui-tabs">
		    <div title="首页" style="padding:20px;">	
		    </div>
		</div>
    </div>
    
<script type="text/javascript">
$(function(){
	var myrole="<%=session.getAttribute("role")%>"; 
	$('#menu').tree({
		url:'./menu/list?role='+myrole,
		animate:true,
		onClick: function(node){
			if($('#menu').tree("isLeaf",node.target)){
				var tabs = $("#tabs");
				var tab = tabs.tabs("getTab",node.text);
				if(tab){
					tabs.tabs("select",node.text);
				}else{
					tabs.tabs('add',{
					    title:node.text,
					    href: node.url,
					    closable:true,
					    bodyCls:"content"
					});
				}
			}
		}
	});
});
</script>
</body>
</html>